package com.szholly.pro.watergas_server.ps.data;

import java.util.HashMap;

import com.szholly.data.general.metadata.table.DefulatDomainTable;import org.springframework.stereotype.Component;import com.szholly.data.general.Field;import com.szholly.data.general.InterceptorTableBase;import com.szholly.data.general.metadata.IBaseTable;import com.szholly.utils.spring.SpringBeanFactory;import org.springframework.stereotype.Component;import com.szholly.data.general.GlobalDataType;import com.szholly.data.general.RowBase;
/**
 * OperationRegistration
 */
@Component("OperationRegistration")
public class OperationRegistrationTable extends InterceptorTableBase  implements IBaseTable{

	public final static String TABLE_NAME = "OP_REGI_INFO";
	
	/**
	 * single ref
	 */
	public static OperationRegistrationTable getSingleRef() {
		return (OperationRegistrationTable) SpringBeanFactory.getBean("OperationRegistration");
	}

	@Override
	public String getMetadataTableName() {
		return TABLE_NAME;
	}

	@Override
	public String getMetadataTableAliasName() {
		return "OperationRegistration";
	}

	private HashMap<String, Field> fields;

	@Override
	protected HashMap<String, Field> fields() {
		if (fields == null) {
			fields = new HashMap<String, Field>();

			Field itemField = null;
			
			itemField = new Field();
			itemField.setFieldName(OperationRegistrationRow.FIELD_Position);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(5);
			itemField.setFieldAliasName("位置");
			itemField.setAllowNull(true);
			itemField.setMaxLen(50);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationRegistrationRow.FIELD_Image);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(6);
			itemField.setFieldAliasName("图片");
			itemField.setAllowNull(true);
			itemField.setMaxLen(200);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationRegistrationRow.FIELD_RegistrationNum);
			itemField.setDataType(GlobalDataType.Int32);
			itemField.setFieldID(7);
			itemField.setFieldAliasName("签到次数");
			itemField.setAllowNull(true);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationRegistrationRow.FIELD_X);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(8);
			itemField.setFieldAliasName("X坐标");
			itemField.setAllowNull(true);
			itemField.setMaxLen(50);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationRegistrationRow.FIELD_Guid);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(9);
			itemField.setFieldAliasName("GUID");
			itemField.setAllowNull(true);
			itemField.setMaxLen(100);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationRegistrationRow.FIELD_UserId);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(10);
			itemField.setFieldAliasName("人员ID");
			itemField.setAllowNull(true);
			itemField.setMaxLen(200);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationRegistrationRow.FIELD_Y);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(11);
			itemField.setFieldAliasName("Y坐标");
			itemField.setAllowNull(true);
			itemField.setMaxLen(50);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationRegistrationRow.FIELD_Time);
			itemField.setDataType(GlobalDataType.DateTime);
			itemField.setFieldID(12);
			itemField.setFieldAliasName("签到时间");
			itemField.setAllowNull(true);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationRegistrationRow.FIELD_LandMark);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(13);
			itemField.setFieldAliasName("地标");
			itemField.setAllowNull(true);
			itemField.setMaxLen(50);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationRegistrationRow.FIELD_GroupId);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(14);
			itemField.setFieldAliasName("组ID");
			itemField.setAllowNull(true);
			itemField.setMaxLen(100);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationRegistrationRow.FIELD_WttpId);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(15);
			itemField.setFieldAliasName("污水处理厂ID");
			itemField.setAllowNull(true);
			itemField.setMaxLen(100);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			
			
			itemField = new Field();
			itemField.setFieldName(OperationRegistrationRow.FIELD_Ct);
			itemField.setDataType(GlobalDataType.DateTime);
			itemField.setFieldID(16);
			itemField.setFieldAliasName("创建时间");
			itemField.setAllowNull(true);
			itemField.setDefaultValue("sysdate");
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
		}
		return fields;
	}

	@Override
	public String getTableGroup() {
		return "OperationRegistration";
	}
}